package com.bosc.automationui.controller;

import com.bosc.automationui.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

@CrossOrigin
@RestController
public class UserController {

    @Autowired
    UserService userService;

    @PostMapping(value = "/auth")
    public void login(String username, String password, HttpServletResponse response) {
        userService.login(username, password, response);
    }
}
